﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _03_匿名函数
{
    class Program
    {
        static void Main(string[] args)
        {
            //var 是匿名函数的关键字
            Person p = new Person();
            var caption = new Person { FirstName="James",MiddleName="T",LastName="Kirk"};
            var doctor = new Person { FirstName = "Sames", MiddleName = "I", LastName = "Tim" };
            Console.WriteLine("FirstName:{0},MiddleName:{1},LastName:{2}",doctor.FirstName,doctor.MiddleName,doctor.LastName);
            Console.WriteLine("FirstName:{0},MiddleName:{1},LastName:{2}", caption.FirstName, caption.MiddleName, caption.LastName);
            
            Console.ReadKey();

        }
    }
    class Person
    {
        public string FirstName { get; set; }
        public string MiddleName { get; set; }
        public string LastName { get; set; }
    }
}
